<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>首页</title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet"
          href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu"
          crossorigin="anonymous">
    <!-- 生产环境版本，优化了尺寸和速度 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

    <style>
        *{padding: 0;margin: 0;}
        body{
            max-width: 1920px;
            min-width: 0;
            margin-left: auto;
            margin-right: auto;
            background-color: #fff;
        }
        .text-white{color: #FFFFFF;}
        .bg-primary{background-color: #8d526d;}
        .t-r{text-align: right;}
        .t-l{text-align: left;}
        a{
            cursor: pointer;
            text-decoration: none;
            outline: none;
            color: #8d526d;
        }
        a:hover{color: #FFFFFF;text-decoration:none}
        .header-top-bg{background-color: #8d526d;height: 60px;}
        .header-top{
            height: 42px;
            line-height: 42px;
            font-size: 16px;
            width: 1266px;
            margin: auto;
            padding: 7px;
        }
        .header-top-banner-item{
            display: inline-block;
            vertical-align: middle;
            padding: 7px 14px;
            position: relative;
            font-size: 16px;
            line-height: 1.5;
        }
        .header-center{
            background-color: #f2f2f2;
            height: 115px;
            padding: 31px 0;
        }
        .inner{width: 1266px;margin: auto;height: 60px;padding: 4px 5px;}
        .heard-menu{
            height: 52px;
            float: right;
            display: inline-block;
            font-size: 16px;
            line-height: 1.5;
            font-weight: bold;
        }
        .header-logo{
            background-color: lightgray;
            height: 50px;
            width: 300px;
            float: left;
        }
        .header-bottom{
            height: 203px;
            padding: 28px 0;
            text-align: center;
            background-color: #F2F2F2;
        }
        .action-item-box{border-right: 1px solid #c6c6c6;}
        .action-item{padding: 14px 0;}
        .header-bottom .action-item a{display: block;}
        .header-bottom .action-item .action-media{
            width: 60px;
            height: auto;
            padding-top: 0;
            position: relative;
            margin: auto;
        }
        .header-bottom .action-item .action-media .media-img{
            position: initial;
            padding-top: 100%;
        }
        .header-bottom .action-item .action-title{
            color: #285277;
            font-weight: normal;
            font-size: 18px;
            line-height: 24px;
            margin: 14px;
            margin-bottom: 7px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .list-item{position: relative;margin-bottom: 24px;}
        .list-item-left{
            float: left;
            width: 55px;
            text-align: center;
            margin-right: 14px;
        }
        .list-date .list-day{
            font-size: 24px;
            line-height: 1;
            margin-top: 3.5px;
            margin-bottom: 3.5px;
            font-style: italic;
            margin-left: -7px;
            color: inherit;
            font-weight: bold;
        }
        .list-date .list-years{
            font-size: 12px;
            line-height: 1.5;
            color: inherit;
        }
        .list-item .list-title{
            color: #000;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 16px;
            line-height: 1.5;
            padding-top: 7px;
        }
        .list-item .list-title a{
            font-size: 16px;
            color: inherit;
        }
        .list-item .list-title a:hover{
            color: #8D526D;
            text-decoration:none
        }
        .list-link{margin-top: 21px;}
        .list-link a{
            background-color: #8d526d;
            border: 1px solid #8d526d;
            color: #fff;
            line-height: 1.5;
            padding: 7px;
            min-width: 125px;
            display: inline-block;
            text-align: center;
        }
        .media .bg{
            border-top: 6px solid #8d526d;
            padding: 28px 35px;
            width: 100%;
            height: auto;
            background-color: #f2f2f2;
        }
        .media .list-top-title{
            font-size: 30px;
            line-height: 1.5;
            color: #8d526d;
            margin-bottom: 21px;
        }
        .media .list-item{float: none;width: 100%;}
        .media .list-body .title{
            display: block;
            max-height: inherit;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 16px;
            line-height: 1.5;
        }
        .media .list-body .title a{
            font-size: inherit;
            line-height: 25px;
            color: #333333;
            overflow: visible;
            box-sizing: border-box;
            word-wrap: break-word;
            text-decoration: none;
            outline: none;
            cursor: pointer;
        }
        .media .list-body .title a:hover{
            color: #8D526D;
            text-decoration:none;
        }
        .media .list-link{text-align: right;}
        .announcement .bg{
            border-top: 6px solid #8d526d;
            padding: 28px 35px;
            width: 100%;
            height: auto;
            background-color: #f2f2f2;
        }
        .announcement .list-top-title{
            font-size: 30px;
            line-height: 1.5;
            color: #8d526d;
            margin-bottom: 21px;
        }
        .announcement .list-item{float: none;width: 100%;}
        .announcement .list-body .title{
            display: block;
            max-height: inherit;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 16px;
            line-height: 1.5;
        }
        .announcement .list-body .title a{
            font-size: inherit;
            line-height: 25px;
            color: #333333;
            overflow: visible;
            box-sizing: border-box;
            word-wrap: break-word;
            text-decoration: none;
            outline: none;
            cursor: pointer;
        }
        .announcement .list-body .title a:hover{
            color: #8D526D;
            text-decoration:none
        }
        .announcement .list-link{text-align: right;}
        .footer-bottom{
            background-color: #333;
            text-align: center;
            color: #fff;
            line-height: 1.5;
            padding: 10.5px 0;
        }
        .footer-bottom p{
            margin: 0 0 7px;
            line-height: 1.5;
            color: #333;
            font-size: 14px;
        }
        .el-carousel__item span {
            color: #475669;
            font-size: 26px;
            opacity: 0.75;
            line-height: 400px;
            margin: 0;
        }
    </style>

</head>
<body>

<div id="app">
    <el-container>
        <el-header style="height: 160px;padding: 0;">
            <!-- 顶部导航条 -->
            <div class="header">
                <div>
                    <div class="header-top-bg ">
                        <div class="header-top t-r ">
                            <div class="header-top-banner-item ">
                                <a class="text-white" href="/demo/userr/userLogin.html" target="_blank">患者</a>
                            </div>
                            <div class="header-top-banner-item ">
                                <a class="text-white" href="/demo/admin/adminIndex.html" target="_blank">员工</a>
                            </div>
                            <div class="header-top-banner-item ">
                                <a class="text-white" target="_blank">E</a>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 顶部中间 部分 -->
                <div class="header-center">
                    <div class="inner">
                        <div class="header-logo">
                            logo
                        </div>
                        <div class="heard-menu">
                            <el-menu
                                    class="el-menu-demo"
                                    mode="horizontal"
                                    background-color="#f2f2f2"
                                    text-color="#000000"
                                    active-text-color="#8d526d">
                                <el-submenu index="1">
                                    <template slot="title">医院概况</template>
                                    <el-menu-item index="1-1">医院介绍</el-menu-item>
                                    <el-menu-item index="1-2">选项2</el-menu-item>
                                    <el-menu-item index="1-3">选项3</el-menu-item>
                                </el-submenu>
                                <el-submenu index="2">
                                    <template slot="title">
                                        <a href="/demo/presscenter.html">新闻中心</a>
                                    </template>
                                    <el-menu-item
                                            v-for="(val, i) in columnArr"
                                            v-bing:index=" '2-' + '{{ val.id }}' ">
                                        <a href="/demo/presscenter.html">{{ val.cname }}</a>
                                    </el-menu-item>
                                </el-submenu>
                                <el-submenu index="3">
                                    <template slot="title">患者服务</template>
                                    <el-menu-item index="3-3">选项1</el-menu-item>
                                </el-submenu>
                                <el-menu-item index="4"><a href="" target="_blank">订单管理</a></el-menu-item>
                            </el-menu>
                        </div>
                    </div>
                </div>
            </div>
        </el-header>
        <!-- banner图 -->
        <el-main style="padding: 0;">
            <template>
                <el-carousel indicator-position="outside">
                    <el-carousel-item>
                        <img src="img/123.png"/>
                    </el-carousel-item>
                </el-carousel>
            </template>
        </el-main>
        <!-- 顶部下边 功能快 -->
        <el-main style="padding: 0;">
            <div class="block">
                <div class="header-bottom">
                    <div class="inner" style="width: 1280px;">
                        <div class="row">
                            <!-- 门诊服务 -->
                            <div class="col-xs-4 col-md-2 action-item-box">
                                <div class="action-item">
                                    <a href="" target="_blank">
                                        <div class="action-media">
                                            <div class="media-img"
                                                 style="background: url(img/media_img1.png) no-repeat;background-size: 60px 60px;"></div>
                                        </div>
                                        <div class="action-title">挂号服务</div>
                                    </a>
                                </div>
                            </div>
                            <!-- 住院服务 -->
                            <div class="col-xs-4 col-md-2 action-item-box">
                                <div class="action-item">
                                    <a href="" target="_blank">
                                        <div class="action-media">
                                            <div class="media-img"
                                                 style="background: url(./img/media_img2.png) no-repeat;background-size: 60px 60px;"></div>
                                        </div>
                                        <div class="action-title">住院服务</div>
                                    </a>
                                </div>
                            </div>
                            <!-- 专科介绍 -->
                            <div class="col-xs-4 col-md-2 action-item-box">
                                <div class="action-item">
                                    <a href="" target="_blank">
                                        <div class="action-media">
                                            <div class="media-img"
                                                 style="background: url(img/media_img3.png) no-repeat;background-size: 60px 60px;"></div>
                                        </div>
                                        <div class="action-title">专科介绍</div>
                                    </a>
                                </div>
                            </div>
                            <!-- 专家介绍 -->
                            <div class="col-xs-4 col-md-2 action-item-box">
                                <div class="action-item">
                                    <a href="" target="_blank">
                                        <div class="action-media">
                                            <div class="media-img"
                                                 style="background: url(img/media_img4.png) no-repeat;background-size: 60px 60px;"></div>
                                        </div>
                                        <div class="action-title">专家介绍</div>
                                    </a>
                                </div>
                            </div>
                            <!-- 健康咨询 -->
                            <div class="col-xs-4 col-md-2 action-item-box">
                                <div class="action-item">
                                    <a href="" target="_blank">
                                        <div class="action-media">
                                            <div class="media-img"
                                                 style="background: url(img/media_img5.png) no-repeat;background-size: 60px 60px;"></div>
                                        </div>
                                        <div class="action-title">健康咨询</div>
                                    </a>
                                </div>
                            </div>
                            <!-- 就医指南 -->
                            <div class="col-xs-4 col-md-2">
                                <div class="action-item">
                                    <a href="" target="_blank">
                                        <div class="action-media">
                                            <div class="media-img"
                                                 style="background: url(img/media_img6.png) no-repeat;background-size: 60px 60px;"></div>
                                        </div>
                                        <div class="action-title">就医指南</div>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </el-main>
        <div style="height: 28px;"></div>
        <!-- 新闻模块 -->
        <el-main style="padding: 0;">
            <div class="inner" style="width: 1280px;max-width: 100%;">
                <!-- 左侧新闻轮播图 -->
                <div class="col-xs-12 col-md-6">
                    <el-carousel
                            height="400px">
                        <el-carousel-item
                                v-for="item in newsTopInfo.slice(0, 6)" :key="item"
                                @click.native="linkTo(item.id)">
                            <span>
                                {{ item.title }}
                            </span>
                            <!--<img src="img/zw1.png">-->
                        </el-carousel-item>
                    </el-carousel>
                </div>
                <!-- 新闻 -->
                <div class="col-xs-12 col-md-6">
                    <div>
                        <div class="list-body">
                            <div v-for="(val, i) in newsTopInfo.slice(0, 6)"
                                 class="list-item">
                                <!-- 新闻发布时间 -->
                                <div class="list-item-left">
                                    <div class="list-date" style="color: #777">
                                        <div class="list-day"
                                             v-html="val.publicDate.substring(8, 10)">
                                            {{ val.publicDate.substring(8, 10) }}
                                        </div>
                                        <div class="list-years"
                                             v-html="val.publicDate.substring(0, 7)">
                                            {{ val.publicDate.substring(0, 7) }}
                                        </div>
                                    </div>
                                </div>
                                <!-- 发布标题 -->
                                <div class="list-item-right">
                                    <div class="list-title"
                                         title="xxx" >
                                        <a :href=" '/demo/news.html?id=' + val.id "
                                           target="_blank">
                                            {{ val.title }}
                                        </a>
                                    </div>
                                </div>
                            </div>
                            <div class="list-link">
                                <a href="presscenter.html"
                                   target="_blank">
                                    更多新闻<i class="el-icon-right"></i>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </el-main>
        <el-main style="padding: 0;">
            <div class="inner" style="width: 1280px;max-width: 100%;">
                <div class="row">
                    <!-- 媒体报道 -->
                    <div class="col-xs-12 col-md-6">
                        <div class="media">
                            <div style="height: 28px;"></div>
                            <div class="bg">
                                <div class="list-top-title">媒体聚焦</div>
                                <!-- 新闻标题  -->
                                <div class="list-content">
                                    <div v-for="(val, i) in newsMediaInfo.slice(0, 6)"
                                         class="list-item">
                                        <div class="list-body">
                                            <div class="title">
                                                <a :href=" '/demo/news.html?id=' + val.id "
                                                   target="_blank">
                                                    {{ val.title }}
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- 更多报道 -->
                                    <div class="list-link">
                                        <a href="presscenter.html">
                                            更多报道<i class="el-icon-right"></i>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 通知报告 -->
                    <div class="col-xs-12 col-md-6">
                        <div class="announcement ">
                            <div style="height: 28px;"></div>
                            <div class="bg">
                                <div class="list-top-title">通知公告</div>
                                <!-- 新闻标题  -->
                                <div class="list-content">
                                    <div v-for="(val, i) in announcementInfo.slice(0, 6)"
                                         class="list-item" >
                                        <div class="list-body">
                                            <div class="title">
                                                <a :href=" '/demo/news.html?id=' + val.id "
                                                   target="_blank">
                                                    {{ val.title }}
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- 更多通知 -->
                                    <div class="list-link">
                                        <a href="presscenter.html">更多通知
                                            <i class="el-icon-right"></i>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </el-main>
        <div style="height: 28px;"></div>
        <el-footer style="padding: 0;">
            <div class="footer-bottom">
                <div class="inner">
                    <div class="footer-text">
                        <p class="text-align-center">
                            <span style="font-size: 14px;">
                                <span style="color: #FFFFFF;">版权所有：XXXXXXXXXX</span>
                                <a href="" target="_blank">
                                    <span style="color: #FFFFFF;">xxxxxxxxx备号</span>
                                </a>
                            </span>
                        </p>
                    </div>
                </div>
            </div>
        </el-footer>
    </el-container>
</div>

<script type="text/javascript">

    /* 主页展示 置顶的新闻 */
    $.get("/demo/hospitalNews/listNewsOnTop", function (backData) {
        haha.newsTopInfo = backData.data;
    });

    /* 主页展示 新闻媒体 */
    $.get("/demo/hospitalNews/listNewsMedia", function (backData) {
        haha.newsMediaInfo = backData.data;
    });

    /* 主页展示 通知公告 */
    $.get("/demo/hospitalNews/listAnnouncement", function (backData) {
        haha.announcementInfo = backData.data;
    });

    /* 查询新闻栏目的信息 */
    $.get("/demo/column/newsListNewsColumn", function (backData) {
        haha.columnArr = backData.data;
    });

    var haha = new Vue({
        el:"#app",
        data:{
            newsTopInfo:[],
            newsMediaInfo:[],
            announcementInfo:[],
            columnArr:[]
        },
        methods:{
            linkTo(id) {
                window.location.href = "/demo/news.html?id=" + id;
            }
        },
    });

</script>
</body>
</html>
